package com.linkoog.devtools.code_generator.database.sqlparser.parser;

import com.linkoog.devtools.code_generator.database.domain.DbType;

public class SqlParserFactory {

    public static SqlParser createSqlParser(DbType dbType){
        if (DbType.MYSQL == dbType){
            return new MysqlSqlParser();
        } else if (DbType.POSTGRE == dbType){
            return new PostgreSqlParser();
        } else if (DbType.ORACLE == dbType){
            return new OracleParser();
        }
        throw new UnsupportedOperationException("Unsupported DbType:" + dbType);
    }
}
